<template>
    <div> 
        编辑活动页面
        <p>
            <span>跳转链接：</span>
            <span>
                <input type="text" placeholder="路径" v-model="url">
            </span>
            <input type="button" value="确定" @click="click"/>
        </p>
        <p>
            <m-path></m-path>    
        </p>
    </div> 
</template>
<script>
    import {mapMutations, mapGetters} from "vuex";
    import editModel from "../../../edit-components/EditModel";
    import PagePath from "../../../edit-components/PagePath";
    export default {
        props: {
            relGroup: {
                type: String,
                default: ""
            }
        },
        data () {
            return {
                url: "",
                page: "index",
                type: "CustomerActivity",
                config: {}
            }
        },
        methods: {
            click() {
                this.setEditConfig(this.relGroup, {url: this.url});
            }
            
        },
        computed: {
            componentConfig() {
                let obj = this.getCurrentVDO(this.relGroup);
                // console.log("更新后的config", obj.config);
                return obj.config || {};
            },
            getUrl: {
                set(val) {
                    // console.log(val, '------', this.page);
                    this.url = val;
                },
                get() {
                    return this.url || "请输入路径"
                }
                // return this.componentConfig.url || "请输入路径"
            }
        },
        created () {
            // console.log(getPageTree(this, this.page));
        },
        components: {
            "m-path" : PagePath
        }
    }
</script>
<style scoped>
    .test2 {
        background: blue;
        width: 100px;
        height: 100px;
    }
    span {
        display: inline;
    }
    p {
        text-align: left;
    }
    input {
        width: 100px;
        height: 30px;
        border: 1px solid #ddd;
        display: inline-block;
    }
</style>